package match_data

import (
	"github.com/spf13/cast"
	"longmen/server/internal/services/nami/services/sports/basketball/bbcache"
	"longmen/server/internal/services/nami/services/sports/football/fbcache"
)

func scoreHistory(roomId string) (string, bool) {
	matchId := cast.ToInt(roomId)

	var cache string

	cache = bbcache.NewScoreCache().GetScoreCache(matchId)
	if len(cache) > 0 {
		return cache, true
	}
	cache = fbcache.NewScoreRedis().GetScoreCache(matchId)
	if len(cache) > 0 {
		return cache, true
	}

	return "", false
}
